import time
from selenium import webdriver
from selenium.webdriver.common.by import By


# 定义测试类
class TestCase:
    # 初始化属性,打开Chrome浏览器
    def __init__(self):
        self.driver = webdriver.Chrome()

    def get_360(self, content):
        # 提交百度网址
        self.driver.get('https://www.so.com')
        # 找到搜索输入框,并输入搜索内容
        self.driver.find_element(By.ID, 'input').send_keys(content)
        # 找到搜索提交按钮并点击
        self.driver.find_element(By.ID, 'search-button').click()

    def quit(self):
        self.driver.quit()


if __name__ == '__main__':
    case1 = TestCase()
    case1.get_360('卷是什么?')
    time.sleep(7)
    case1.quit()